package com.enlorenz.common.geo.map;

import java.util.Properties;

import com.enlorenz.util.FileUtil;

/**
 * 测试
 * 
 * com.copote.common.map.bing.BingTileFileParser
 * com.copote.common.map.google.GoogleTileCmdConsole
 * com.copote.common.map.amap.AmapTileCmdConsole
 * 
 * @author lcb
 */
public class MapParserPropertyRunner extends AbstractMapParserBaseRunner{
	private Properties properties;
	
	/**
	 *  缩放级别 开启线程数 输入目录 输出目录
	 *  112.930526,28.239674:113.065109,28.233019:113.035583,28.111960:112.935333,28.148292 14 30 D:\\roadmap_cn D:\\roadmap_cn_dst
	 * @param args
	 * @throws Exception
	 */
    public static void main(String [] args) throws Exception {
    	Properties properties=FileUtil.getProperties(args[0]);
    	
    	MapParserPropertyRunner mapParserParamRunner=new MapParserPropertyRunner();
    	mapParserParamRunner.setProperties(properties);
    	mapParserParamRunner.doMap();
    }
    
    public void setProperties(Properties properties) {
		this.properties = properties;
	}

	@Override
	protected String getPointListStr() {
		return properties.getProperty("pointList");
	}

	@Override
	protected String getZoom() {
		return properties.getProperty("zoom");
	}

	@Override
	protected String getThreadNum() {
		return properties.getProperty("threadNum");
	}

	@Override
	protected String getSrcFilePath() {
		return properties.getProperty("srcFilePath");
	}

	@Override
	protected String getDstFilePath() {
		return properties.getProperty("dstFilePath");
	}

	@Override
	protected String getCoreClass() {
		return properties.getProperty("coreClass");
	}

	@Override
	protected String getTemplateUrl() {
		return properties.getProperty("templateUrl");
	}

	@Override
	protected String getPicTryTimes() {
		return properties.getProperty("picTryTimes");
	}

	@Override
	protected Boolean getDisplayUrl() {
		return Boolean.valueOf(properties.getProperty("displayUrl"));
	}
	
	/**
	 * 是否覆盖
	 * @return
	 */
	protected Boolean getCover(){
		return Boolean.valueOf(properties.getProperty("cover"));
	}

	@Override
	protected String getStep() {
		return properties.getProperty("step");
	}
	
}
